package com.fish.account.dao;

import com.fish.account.po.Account;
import com.fish.account.po.Balance;
import com.fish.common.dao.BaseIbatisDao;
/**
 * 余额操作
 * @author clj
 *
 */

public class BalanceDAO extends BaseIbatisDao {

	public Balance queryBalanceByUser(String userId) {
		return (Balance) this.getSqlMapClientTemplate().queryForObject("BALANCE.queryBalanceByUser",userId);
	}

	public void insertBalance(Balance balance) {
		this.getSqlMapClientTemplate().insert("BALANCE.insert", balance);
	}
	
	public void updateByUser(Balance balance) {
		this.getSqlMapClientTemplate().update("BALANCE.updateByUser", balance);
	}
}